<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>scripty2 API documentation | Element.Layout class</title>
    <link type="text/css" charset="utf-8" rel="stylesheet" media="screen, projection" href="../../stylesheets/apidocs.css" />
  </head>
  <body>
    <div id="page">

      <div id="masthead">
        <div id="masthead_content">
          <a href="../../">
            <h1 id="logo"><span class="replaced">scripty2</span></h1>
          </a>
          <div id="menu" class="clearfix">
            <div class="search-box">
              <form action="" method="get">
                <label><span class="hidden">Search </span><input type="text" id="search" size="20" /></label>
              </form>
              <ul id="search_results" class="search-results menu-items" style="display:none"><li></li></ul>
            </div>
            <div class="api-box">
              <h2><a href="#" id="api_menu_button">Quick Links &darr;</a></h2>
              <ul id="api_menu" class="menu-items" style="display: none">
                
                  <li>              <div class='menu-item'>
                <a class="section" href="../../scripty2_core_section.html" title="scripty2 core section (section)">scripty2 core section</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 core/function.html" title="Function (class)">Function</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 core/number.html" title="Number (class)">Number</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 core/object.html" title="Object (class)">Object</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 core/s2.html" title="S2 (namespace)">S2</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 ui/s2/css.html" title="S2.CSS (namespace)">S2.CSS</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 core/s2/extensions.html" title="S2.Extensions (namespace)">S2.Extensions</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 fx/s2/fx.html" title="S2.FX (namespace)">S2.FX</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/attribute.html" title="S2.FX.Attribute (class)">S2.FX.Attribute</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/base.html" title="S2.FX.Base (class)">S2.FX.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/element.html" title="S2.FX.Element (class)">S2.FX.Element</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/heartbeat.html" title="S2.FX.Heartbeat (class)">S2.FX.Heartbeat</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/morph.html" title="S2.FX.Morph (class)">S2.FX.Morph</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 fx/s2/fx/operators.html" title="S2.FX.Operators (namespace)">S2.FX.Operators</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/base.html" title="S2.FX.Operators.Base (class)">S2.FX.Operators.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/scroll.html" title="S2.FX.Operators.Scroll (class)">S2.FX.Operators.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/style.html" title="S2.FX.Operators.Style (class)">S2.FX.Operators.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/webkitcsstransition.html" title="S2.FX.Operators.WebkitCssTransition (class)">S2.FX.Operators.WebkitCssTransition</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/parallel.html" title="S2.FX.Parallel (class)">S2.FX.Parallel</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/queue.html" title="S2.FX.Queue (class)">S2.FX.Queue</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/scroll.html" title="S2.FX.Scroll (class)">S2.FX.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/style.html" title="S2.FX.Style (class)">S2.FX.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 fx/s2/fx/transitions.html" title="S2.FX.Transitions (namespace)">S2.FX.Transitions</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/base.html" title="S2.FX.Operators.Base (class)">S2.FX.Operators.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/scroll.html" title="S2.FX.Operators.Scroll (class)">S2.FX.Operators.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/style.html" title="S2.FX.Operators.Style (class)">S2.FX.Operators.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/webkitcsstransition.html" title="S2.FX.Operators.WebkitCssTransition (class)">S2.FX.Operators.WebkitCssTransition</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 ui/s2/ui.html" title="S2.UI (namespace)">S2.UI</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/accordion.html" title="S2.UI.Accordion (class)">S2.UI.Accordion</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/autocompleter.html" title="S2.UI.Autocompleter (class)">S2.UI.Autocompleter</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/base.html" title="S2.UI.Base (class)">S2.UI.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior.html" title="S2.UI.Behavior (class)">S2.UI.Behavior</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/down.html" title="S2.UI.Behavior.Down (class)">S2.UI.Behavior.Down</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/drag.html" title="S2.UI.Behavior.Drag (class)">S2.UI.Behavior.Drag</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/focus.html" title="S2.UI.Behavior.Focus (class)">S2.UI.Behavior.Focus</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/hover.html" title="S2.UI.Behavior.Hover (class)">S2.UI.Behavior.Hover</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/resize.html" title="S2.UI.Behavior.Resize (class)">S2.UI.Behavior.Resize</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/button.html" title="S2.UI.Button (class)">S2.UI.Button</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/dialog.html" title="S2.UI.Dialog (class)">S2.UI.Dialog</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/menu.html" title="S2.UI.Menu (class)">S2.UI.Menu</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 ui/s2/ui/mixin.html" title="S2.UI.Mixin (namespace)">S2.UI.Mixin</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/configurable.html" title="S2.UI.Mixin.Configurable (mixin)">S2.UI.Mixin.Configurable</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/shim.html" title="S2.UI.Mixin.Shim (mixin)">S2.UI.Mixin.Shim</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/trackable.html" title="S2.UI.Mixin.Trackable (mixin)">S2.UI.Mixin.Trackable</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 ui/s2/ui/multitouch.html" title="S2.UI.Multitouch (namespace)">S2.UI.Multitouch</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/overlay.html" title="S2.UI.Overlay (class)">S2.UI.Overlay</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/progressbar.html" title="S2.UI.ProgressBar (class)">S2.UI.ProgressBar</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/slider.html" title="S2.UI.Slider (class)">S2.UI.Slider</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/tabs.html" title="S2.UI.Tabs (class)">S2.UI.Tabs</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/down.html" title="S2.UI.Behavior.Down (class)">S2.UI.Behavior.Down</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/drag.html" title="S2.UI.Behavior.Drag (class)">S2.UI.Behavior.Drag</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/focus.html" title="S2.UI.Behavior.Focus (class)">S2.UI.Behavior.Focus</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/hover.html" title="S2.UI.Behavior.Hover (class)">S2.UI.Behavior.Hover</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/resize.html" title="S2.UI.Behavior.Resize (class)">S2.UI.Behavior.Resize</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/configurable.html" title="S2.UI.Mixin.Configurable (mixin)">S2.UI.Mixin.Configurable</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/shim.html" title="S2.UI.Mixin.Shim (mixin)">S2.UI.Mixin.Shim</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/trackable.html" title="S2.UI.Mixin.Trackable (mixin)">S2.UI.Mixin.Trackable</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/attribute.html" title="S2.FX.Attribute (class)">S2.FX.Attribute</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/base.html" title="S2.FX.Base (class)">S2.FX.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/element.html" title="S2.FX.Element (class)">S2.FX.Element</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/heartbeat.html" title="S2.FX.Heartbeat (class)">S2.FX.Heartbeat</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/morph.html" title="S2.FX.Morph (class)">S2.FX.Morph</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 fx/s2/fx/operators.html" title="S2.FX.Operators (namespace)">S2.FX.Operators</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/base.html" title="S2.FX.Operators.Base (class)">S2.FX.Operators.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/scroll.html" title="S2.FX.Operators.Scroll (class)">S2.FX.Operators.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/style.html" title="S2.FX.Operators.Style (class)">S2.FX.Operators.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/webkitcsstransition.html" title="S2.FX.Operators.WebkitCssTransition (class)">S2.FX.Operators.WebkitCssTransition</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/parallel.html" title="S2.FX.Parallel (class)">S2.FX.Parallel</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/queue.html" title="S2.FX.Queue (class)">S2.FX.Queue</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/scroll.html" title="S2.FX.Scroll (class)">S2.FX.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/style.html" title="S2.FX.Style (class)">S2.FX.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 fx/s2/fx/transitions.html" title="S2.FX.Transitions (namespace)">S2.FX.Transitions</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/base.html" title="S2.FX.Operators.Base (class)">S2.FX.Operators.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/scroll.html" title="S2.FX.Operators.Scroll (class)">S2.FX.Operators.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/style.html" title="S2.FX.Operators.Style (class)">S2.FX.Operators.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/webkitcsstransition.html" title="S2.FX.Operators.WebkitCssTransition (class)">S2.FX.Operators.WebkitCssTransition</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/accordion.html" title="S2.UI.Accordion (class)">S2.UI.Accordion</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/autocompleter.html" title="S2.UI.Autocompleter (class)">S2.UI.Autocompleter</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/base.html" title="S2.UI.Base (class)">S2.UI.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior.html" title="S2.UI.Behavior (class)">S2.UI.Behavior</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/down.html" title="S2.UI.Behavior.Down (class)">S2.UI.Behavior.Down</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/drag.html" title="S2.UI.Behavior.Drag (class)">S2.UI.Behavior.Drag</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/focus.html" title="S2.UI.Behavior.Focus (class)">S2.UI.Behavior.Focus</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/hover.html" title="S2.UI.Behavior.Hover (class)">S2.UI.Behavior.Hover</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/resize.html" title="S2.UI.Behavior.Resize (class)">S2.UI.Behavior.Resize</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/button.html" title="S2.UI.Button (class)">S2.UI.Button</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/dialog.html" title="S2.UI.Dialog (class)">S2.UI.Dialog</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/menu.html" title="S2.UI.Menu (class)">S2.UI.Menu</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 ui/s2/ui/mixin.html" title="S2.UI.Mixin (namespace)">S2.UI.Mixin</a>
              </div>
<ul><li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/configurable.html" title="S2.UI.Mixin.Configurable (mixin)">S2.UI.Mixin.Configurable</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/shim.html" title="S2.UI.Mixin.Shim (mixin)">S2.UI.Mixin.Shim</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/trackable.html" title="S2.UI.Mixin.Trackable (mixin)">S2.UI.Mixin.Trackable</a>
              </div>
</li></ul></li>
<li>              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 ui/s2/ui/multitouch.html" title="S2.UI.Multitouch (namespace)">S2.UI.Multitouch</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/overlay.html" title="S2.UI.Overlay (class)">S2.UI.Overlay</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/progressbar.html" title="S2.UI.ProgressBar (class)">S2.UI.ProgressBar</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/slider.html" title="S2.UI.Slider (class)">S2.UI.Slider</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/tabs.html" title="S2.UI.Tabs (class)">S2.UI.Tabs</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/down.html" title="S2.UI.Behavior.Down (class)">S2.UI.Behavior.Down</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/drag.html" title="S2.UI.Behavior.Drag (class)">S2.UI.Behavior.Drag</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/focus.html" title="S2.UI.Behavior.Focus (class)">S2.UI.Behavior.Focus</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/hover.html" title="S2.UI.Behavior.Hover (class)">S2.UI.Behavior.Hover</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/resize.html" title="S2.UI.Behavior.Resize (class)">S2.UI.Behavior.Resize</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/configurable.html" title="S2.UI.Mixin.Configurable (mixin)">S2.UI.Mixin.Configurable</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/shim.html" title="S2.UI.Mixin.Shim (mixin)">S2.UI.Mixin.Shim</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/trackable.html" title="S2.UI.Mixin.Trackable (mixin)">S2.UI.Mixin.Trackable</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/base.html" title="S2.FX.Operators.Base (class)">S2.FX.Operators.Base</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/scroll.html" title="S2.FX.Operators.Scroll (class)">S2.FX.Operators.Scroll</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/style.html" title="S2.FX.Operators.Style (class)">S2.FX.Operators.Style</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/s2/fx/operators/webkitcsstransition.html" title="S2.FX.Operators.WebkitCssTransition (class)">S2.FX.Operators.WebkitCssTransition</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/down.html" title="S2.UI.Behavior.Down (class)">S2.UI.Behavior.Down</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/drag.html" title="S2.UI.Behavior.Drag (class)">S2.UI.Behavior.Drag</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/focus.html" title="S2.UI.Behavior.Focus (class)">S2.UI.Behavior.Focus</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/hover.html" title="S2.UI.Behavior.Hover (class)">S2.UI.Behavior.Hover</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 ui/s2/ui/behavior/resize.html" title="S2.UI.Behavior.Resize (class)">S2.UI.Behavior.Resize</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/configurable.html" title="S2.UI.Mixin.Configurable (mixin)">S2.UI.Mixin.Configurable</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/shim.html" title="S2.UI.Mixin.Shim (mixin)">S2.UI.Mixin.Shim</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="mixin" href="../../scripty2 ui/s2/ui/mixin/trackable.html" title="S2.UI.Mixin.Trackable (mixin)">S2.UI.Mixin.Trackable</a>
              </div>
</li></ul></li></ul></li>
                
                  <li class="current-parent">              <div class='menu-item'>
                <a class="section" href="../../scripty2_fx_section.html" title="scripty2 fx section (section)">scripty2 fx section</a>
              </div>
<ul><li class="current-parent">              <div class='menu-item'>
                <a class="namespace" href="../../scripty2 fx/element.html" title="Element (namespace)">Element</a>
              </div>
<ul><li class="current">              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/element/layout.html" title="Element.Layout (class)">Element.Layout</a>
              </div>
</li>
<li>              <div class='menu-item'>
                <a class="class" href="../../scripty2 fx/element/offset.html" title="Element.Offset (class)">Element.Offset</a>
              </div>
</li></ul></li></ul></li>
                
                  <li>              <div class='menu-item'>
                <a class="section" href="../../scripty2_ui_section.html" title="scripty2 ui section (section)">scripty2 ui section</a>
              </div>
</li>
                
              </ul>
            </div>
          </div>
        </div>
      </div>

      <div id="main" class="page-content">
        

<ul class="breadcrumbs clearfix">
  <li><a href="../../index.html">Home</a> &rarr;</li>
  
  <li><a href="../../scripty2_fx_section.html">scripty2 fx</a> &rarr;</li>
  
</ul>

<h2 class="page-title class">
  <span class="type">class </span>Element.Layout
</h2>


<div class="section section-description">
  <div class="section-title">
    <h3>Description</h3>
  </div>
  <div class="section-content">
    <p>A set of key/value pairs representing measurements of various
dimensions of an element.</p>

<h4>Overview</h4>

<p>The <code>Element.Layout</code> class is a specialized way to measure elements.
It helps mitigate:</p>

<ul>
<li>The convoluted steps often needed to get common measurements for
elements.</li>
<li>The tendency of browsers to report measurements in non-pixel units.</li>
<li>The quirks that lead some browsers to report inaccurate measurements.</li>
<li>The difficulty of measuring elements that are hidden.</li>
</ul>

<h4>Usage</h4>

<p>Instantiate an <code>Element.Layout</code> class by passing an element into the
constructor:</p>

<p>var layout = new Element.Layout(someElement);</p>

<p>You can also use <code><a href="../../scripty2 fx/element.html#getlayout-class_method" title="Element.getLayout (class method)">Element.getLayout</a></code>, if you prefer.</p>

<p>Once you have a layout object, retrieve properties using Hash's
familiar <code>get</code> and <code>set</code> syntax.</p>

<p>layout.get('width');  //-> 400
  layout.get('top');    //-> 180</p>

<p>The following are the CSS-related properties that can be retrieved.
Nearly all of them map directly to their property names in CSS. (The
only exception is for borders — e.g., <code>border-width</code> instead of
<code>border-left-width</code>.)</p>

<ul>
<li><code>height</code></li>
<li><code>width</code></li>
<li><code>top</code></li>
<li><code>left</code></li>
<li><code>right</code></li>
<li><code>bottom</code></li>
<li><code>border-left</code></li>
<li><code>border-right</code></li>
<li><code>border-top</code></li>
<li><code>border-bottom</code></li>
<li><code>padding-left</code></li>
<li><code>padding-right</code></li>
<li><code>padding-top</code></li>
<li><code>padding-bottom</code></li>
<li><code>margin-top</code></li>
<li><code>margin-bottom</code></li>
<li><code>margin-left</code></li>
<li><code>margin-right</code></li>
</ul>

<p>In addition, these "composite" properties can be retrieved:</p>

<ul>
<li><code>padding-box-width</code> (width of the content area, from the beginning of
the left padding to the end of the right padding)</li>
<li><code>padding-box-height</code> (height of the content area, from the beginning
of the top padding to the end of the bottom padding)</li>
<li><code>border-box-width</code> (width of the content area, from the outer edge of
the left border to the outer edge of the right border)</li>
<li><code>border-box-height</code> (height of the content area, from the outer edge
of the top border to the outer edge of the bottom border)</li>
<li><code>margin-box-width</code> (width of the content area, from the beginning of
the left margin to the end of the right margin)</li>
<li><code>margin-box-height</code> (height of the content area, from the beginning
of the top margin to the end of the bottom margin)</li>
</ul>

<h4>Caching</h4>

<p>Because these properties can be costly to retrieve, <code>Element.Layout</code>
behaves differently from an ordinary Hash.</p>

<p>First: by default, values are "lazy-loaded" — they aren't computed
until they're retrieved. To measure all properties at once, pass
a second argument into the constructor:<div class="CodeRay">
  <div class="code"><pre><span style="color:#080;font-weight:bold">var</span> layout = <span style="color:#080;font-weight:bold">new</span> Element.Layout(someElement, <span style="color:#080;font-weight:bold">true</span>);</pre></div>
</div>
Second: once a particular value is computed, it's cached. Asking for
the same property again will return the original value without
re-computation. This means that **an instance of <code>Element.Layout</code>
becomes stale when the element's dimensions change**. When this
happens, obtain a new instance.</p>

<p><h4>Hidden elements<h4></p>

<p>Because it's a common case to want the dimensions of a hidden element
(e.g., for animations), it's possible to measure elements that are
hidden with <code>display: none</code>.</p>

<p>However, **it's only possible to measure a hidden element if its parent
is visible**. If its parent (or any other ancestor) is hidden, any
width and height measurements will return <code>0</code>, as will measurements for
<code>top|bottom|left|right</code>.</p>
  </div>
</div>



  

  







<div class="section section-method-list">
  <div class="section-title">
    <h3>Methods</h3>
  </div>
  <div class="section-content">
    <ul class="method-list">
      
        <li><code><a class="instance-method" href="../../scripty2 fx/element/layout.html#get-instance_method" title="Element.Layout#get (instance method)">get</a></code></li>
      
        <li><code><a class="constructor" href="../../scripty2 fx/element/layout.html#new-constructor" title="new Element.Layout (constructor)">new</a></code></li>
      
    </ul>
    
  </div>
</div>



<div class="section section-constructor">
  <div class="section-title">
    <h3>Constructor</h3>
  </div>
  <div class="section-content">
    <pre id="new-constructor" class="syntax"><code>new Element.Layout(element[, preCompute])</code></pre>
    
      <ul class="argument-list">
        
          <li>
            <code>element</code>
            
              (<code><a href="../../scripty2 fx/element.html" title="Element (namespace)">Element</a></code>)
            
             &ndash; The element to be measured.
          </li>
        
          <li>
            <code>preCompute</code>
            
              (<code>Boolean</code>)
            
             &ndash; Whether to compute all values at once.
          </li>
        
      </ul>
    
    <p><p>Declare a new layout hash.</p>

<p>The <code>preCompute</code> argument determines whether measurements will be
lazy-loaded or not. If you plan to use many different measurements,
it's often more performant to pre-compute, as it minimizes the
amount of overhead needed to measure. If you need only one or two
measurements, it's probably not worth it.</p></p>
  </div>
</div>





  
  

  
  

  
  

  
  
    <div class="section section-constants">
      <div class="section-title">
        <h3>Constants</h3>
      </div>
      <div class="section-content">
        <ul class="method-details-list">
          <li class="method-description">
  <h4 id="composite_properties-constant">COMPOSITE_PROPERTIES
    <span class="method-permalink"><a href="../../scripty2 fx/element/layout.html#composite_properties-constant">#</a></span></h4>

  
  
  
  
  <p>A list of all composite properties. Composite properties don't map
directly to CSS properties — they're combinations of other
properties.</p>

  
  
  
  
</li>

<li class="method-description">
  <h4 id="properties-constant">PROPERTIES
    <span class="method-permalink"><a href="../../scripty2 fx/element/layout.html#properties-constant">#</a></span></h4>

  
  
  
  
  <p>A list of all measurable properties.</p>

  
  
  
  
</li>

        </ul>
      </div>
    </div>
  

  
  
    <div class="section section-instance_methods">
      <div class="section-title">
        <h3>Instance methods</h3>
      </div>
      <div class="section-content">
        <ul class="method-details-list">
          <li class="method-description">
  <h4 id="get-instance_method">get
    <span class="method-permalink"><a href="../../scripty2 fx/element/layout.html#get-instance_method">#</a></span></h4>

  
                  <pre class="syntax"><code class="ebnf">Element.Layout#get(property) -&gt; <a href="../../scripty2 core/number.html" title="Number (class)">Number</a></code></pre>

  
  
  
    
      <ul class="argument-list">
        
          <li>
            <code>property</code>
            
              (<code>String</code>)
            
             &ndash; One of the properties defined in <code><a href="../../scripty2 fx/element/layout.html#properties-constant" title="Element.Layout.PROPERTIES (constant)">Element.Layout.PROPERTIES</a></code>.
          </li>
        
      </ul>
    
  
  
  <p>Retrieve the measurement specified by <code>property</code>. Will throw an error
if the property is invalid.</p>

  
  
  
  
</li>

        </ul>
      </div>
    </div>
  

      </div>

      <div id="footer">
        <div class="about clearfix">
          <div class="copyright clearfix">
            <div class="copyright-about">
              This work is licensed under a<br/>
              <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.<br/>
            </div>
          </div>
          <div class="credits">
            <p>
              Generated by <a href="http://pdoc.org">PDoc</a>.
              Icons by <a href="http://froodee.at/">Samo</a>.
            </p>
            <p>
              Copyright © 2005-2010 <a href="http://mir.aculo.us/">Thomas Fuchs</a>.
            </p>
          </div>
        </div>
      </div>
    </div>

    <script type="text/javascript" src="../../javascripts/prototype.js" charset="utf-8"></script>
<script type="text/javascript" src="../../javascripts/s2.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../javascripts/application.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../javascripts/item_index.js" charset="utf-8"></script>
    <script type="text/javascript">PDoc.pathPrefix = '../../';</script>
  </body>
</html>
